package com.hamny.gwt.media.client;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;

public class MediaStream extends JavaScriptObject {

	protected MediaStream() {

	}

	public final native String getId()
	/*-{
		return this.id;
	}-*/;

	public final native JsArray<MediaStreamTrack> getAudioTracks()
	/*-{
		return this.getAudioTracks();
	}-*/;

	public final native JsArray<MediaStreamTrack> getVideoTracks()
	/*-{
		return this.getVideoTracks();
	}-*/;

	public final native MediaStreamTrack getTrackById(String trackId)
	/*-{
		return this.getTrackById(trackId);
	}-*/;

	public final native void addTrack(MediaStreamTrack track)
	/*-{
		return this.addTrack(track);
	}-*/;

	public final native void removeTrack(MediaStreamTrack track)
	/*-{
		return this.removeTrack(track);
	}-*/;

	public final native MediaStream clone()
	/*-{
		return this.clone();
	}-*/;

	public final native boolean getEnded()
	/*-{
		return this.ended;
	}-*/;
	
	public final native void setMediaStreamListener(MediaStreamEventHandler listener)
	/*-{
	}-*/;
}
